package edu.sctu.zcy.month201505.day20150525;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.text.DateFormat;
import java.util.*;

/**
 * Created by user24 on 2015/5/25.
 */
public class TranslateDemo {

    public static void main(String[] args) {

        String[] strings = {"10","09","08","01","05","02","06","07","03","04"};

//通过Arrays类的aslist方法转换数组到list类
        List list = Arrays.asList(strings);
        System.out.println("list = "+list);

//通过构造器将list集合转换为Vector集合
        Vector vector = new Vector(list);
        System.out.println("vector ="+vector);

//通过addAll方法将list集合转换为ArrayList集合
        ArrayList arrayList = new ArrayList();
        arrayList.addAll(list);
        System.out.println("arraylist = "+arrayList);
//通过构造器将list集合转换为Hashset集合

        HashSet hashSet = new HashSet(list);
        System.out.println("hashset = "+hashSet);

//通过构造器将list集合转换为TreeSet集合

        TreeSet treeSet = new TreeSet(list);
        System.out.println("treeset = "+treeSet);

        Vector vector1 = new Vector();

        Double[] doubles = new Double[2000000];
        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.getTime());
        calendar.set(calendar.DATE,1);
        System.out.println();

        Date date = new Date();
        DateFormat dateFormat = DateFormat.getDateInstance();
        System.out.println( dateFormat.format(date));














    }
}
